package njust.edu.service;

import njust.edu.entity.Dish;
import njust.edu.entity.DishType;
import njust.edu.web.DishTypeSale;
import njust.edu.web.Page;

import java.util.List;

public interface DishService {
    //
    Page<Dish> getPage(int n, String condition, String likeStr);

    //查找所有菜品列表
    List<DishType> getDishList();

    //增加菜品
    void addBook(String id,String name, Integer type_id, Float price, String picture,
                 int sale, Integer stock, String description);

    //通过id查找菜品
    Dish getDishById(String id);

    //编辑菜单
    void editBook(String id, String name, Integer type_id, Float price,
                  String picture, int sale, Integer stock, String description);

    //删除菜品
    void deleteBook(String id);

    //更改库存
    Integer changeStock(String id, Integer stock);

    //检查库存
    Boolean checkStock(String id, Integer stockNum);

    //获得菜品的销量
    List<DishTypeSale> getDishTypeSales();

    //得到所有菜品的列表
    List<Dish> getAllDishList();

    //通过关键字查找所有相关的菜品
    List<Dish> getAllDishList(String keyword);
}

